import count from '@feidao/web/atom/nodejs/db/count';
import squery from '@feidao/web/atom/nodejs/db/sql_query';
import { IBaseTable } from '@feidao/web/atom/nodejs/db/interfaces';

import { spaceid, systemid } from './config';

interface Message {
	filter: {};
	page_size: number;
	page_no: number;
	asc: string[];
	desc: string[];
}

export default async function atom(msg: Message, action_id: string, session_id: string) {
	const sql = 'select * from msz_test1';
	const { exec, prepare } = await squery(action_id, session_id, spaceid, systemid);
	prepare(sql);
	const [res] = await exec();
	return res;
}
